#include "stm32g4xx_hal.h"

#define KEY4 HAL_GPIO_ReadPin(KEY4_GPIOx, KEY4_PIN)
#define KEY1 HAL_GPIO_ReadPin(KEY1_3_GPIOx, KEY1_PIN)
#define KEY2 HAL_GPIO_ReadPin(KEY1_3_GPIOx, KEY2_PIN)
#define KEY3 HAL_GPIO_ReadPin(KEY1_3_GPIOx, KEY3_PIN)

#define KEY4_PIN GPIO_PIN_0
#define KEY1_PIN GPIO_PIN_0
#define KEY2_PIN GPIO_PIN_1
#define KEY3_PIN GPIO_PIN_2

#define KEY4_GPIOx   GPIOA
#define KEY1_3_GPIOx GPIOB

void KEY_Init(void);
int KEY_Scan(void);
